package com.zj.service;

import com.zj.web.bean.RedPacketActivityDTO;
import com.zj.web.bean.UserRedPacketDTO;

import java.util.List;

public interface RedPacketService {
    //活动的状态
    //未开始
    int PRODUCT_STATUS_NORMAL = 0;
    //进行中
    int PRODUCT_STATUS_RUNNING = 1;
    //已结束
    int PRODUCT_STATUS_FINISHED = 2;

    //发红包，添加红包活动到数据库
    public RedPacketActivityDTO publishRedPacket(RedPacketActivityDTO redPacketActivityDTO);

    //查询所有的活动信息
    public List<RedPacketActivityDTO> getAllRedPacketActivities();
    //根据 活动id查询活动状态
    public Integer getRedPacketActivityStatus(Long activityId);
    //根据查询最新的活动信息
    public RedPacketActivityDTO getRedPacketActivity();
    //抢红包
    public GrabResult grabRedPacket(Long redPacketId, Long userId);

    //将用户抢红包的信息添加到数据库
    public UserRedPacketDTO addUserRedPacket(UserRedPacketDTO userRedPacketDTO);
}
